package kr.hkit.androidcomplete03.ETC;

import kr.hkit.androidcomplete03.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ViewFlipper;

public class FlipperTest extends Activity {
	Button btnPrev, btnNext;
	ViewFlipper vFlipper = null;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.flippertest);
		
		btnPrev = (Button) findViewById(R.id.btnprev);
		btnNext = (Button) findViewById(R.id.btnnext);
		vFlipper = (ViewFlipper) findViewById(R.id.viewFlipper1);
		
		
		btnPrev.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				//vFlipper.showPrevious();
				vFlipper.startFlipping();
				vFlipper.setFlipInterval(1000);
			}
			
		});
		
		btnNext.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				//vFlipper.showNext();
				vFlipper.stopFlipping();
			}
			
		});
		
		
	}
}
